package edu.spec.rxz.week08.homework.D1t;

public class Cylinder extends Circle {

    private double high;

    public Cylinder(double r, double h) {
        super(r);
        this.high = h;
    }

    public double getVolume() {
        return getArea() * high;
    }

    public void showVolume() {
        System.out.println("Volume" + getVolume());
    }
}
public class Test {
    public static void main(String[] args) {
        Circle c = new Circle(1);
        System.out.println(c.getRadius());
        System.out.println(c.getArea());
        System.out.println(c.getPerimeter());
        Cylinder cl = new Cylinder(1, 1);
        System.out.println(cl.getVolume());
    }
}
